package listener;

import event.EmailEvent;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class testEmailListener {
    public static void main(String[] args) {
        ApplicationContext ctx = new ClassPathXmlApplicationContext("beans.xml");
        EmailEvent emailEvent = new EmailEvent("test",
                "spring@163.com",
                "This is a test.");
        ctx.publishEvent(emailEvent);
    }
}
